package com.java.test.Memory;

import org.junit.Test;

/**
 * @author TonyOne
 * @version 1.0
 * @desc
 * @date 2018/10/9 9:49
 * @company
 */
public class HeapAndStackMemory {

    @Test
    public void heapAndStackMemoryUsage() { // Line 1
        int i=1; // Line 2
        Object obj = new Object(); // Line 3
        HeapAndStackMemory mem = new HeapAndStackMemory(); // Line 4
        mem.foo(obj); // Line 5
    } // Line 9

    private void foo(Object param) { // Line 6
        String str = param.toString(); //// Line 7
        System.out.println(str);
    } // Line 8
}
